// @ts-ignore
function Vechile(brandNo, price) {
  // 父类
  console.log("this:", this);
  this.brandNo = brandNo; // 品牌
  this.price = price; // 价格
}

Vechile.prototype.sale = function () {
  console.log(this + "销售");
};

// 继承
// @ts-ignore
function Bus(brandNo, price, seatNo) {
  // 子类 构造函数继承
  Vechile.call(this, brandNo, price);
  this.seatNo = seatNo;
}

// @ts-ignore
function Car(brandNo, price, types) {
  // 子类
  Vechile.apply(this, [brandNo, price]);
  this.types = types;
}
// 原型链继承
Bus.prototype = new Vechile();
Bus.prototype.constructor = Bus;
// @ts-ignore
let bus = new Bus("大巴", 20, 64);
console.log("🚀 ~ bus:", bus);
// @ts-ignore
bus.sale();
